#import "EOAcceptsNullForScalarsObject.h"

@interface EONullScalarSetter : NSObject
+ (EONullScalarSetter  *)sharedInstance;
@end

@implementation EONullScalarSetter
static EONullScalarSetter *_instance = nil;

+ (EONullScalarSetter  *)sharedInstance
{
    if (!_instance)
        _instance = [self new];
    return _instance;
}

- (char)charValue    {return 0;}
- (unsigned char)unsignedCharValue    {return 0;}
- (short)shortValue    {return 0;}
- (unsigned short)unsignedShortValue    {return 0;}
- (int)intValue    {return 0;}
- (unsigned int)unsignedIntValue    {return 0;}
- (long)longValue    {return 0;}
- (unsigned long)unsignedLongValue    {return 0;}
- (long long)longLongValue    {return 0;}
- (unsigned long long)unsignedLongLongValue    {return 0;}
- (float)floatValue    {return 0;}
- (double)doubleValue    {return 0;}
- (BOOL)boolValue    {return 0;}
- (NSString *)stringValue    {return 0;}
@end


@implementation EOAcceptsNullForScalarsObject

- (void)unableToSetNullForKey:(NSString *)key
{
    id value = [EONullScalarSetter sharedInstance];
    [self takeValuesFromDictionary:[NSDictionary dictionaryWithObjects:&value forKeys:&key count:1]];
}
@end